<template>
  <!-- 新增按钮 -->
  <el-main>
  <el-table :data="tableData">
    <el-table-column prop="teacher_name" label="教师姓名" width="200">
    </el-table-column>
    <el-table-column prop="teacher_sex" label="教师性别" width="200">
    </el-table-column>
    <el-table-column prop="t_phone" label="教师电话" width="200">
    </el-table-column>
    <el-table-column prop="t_idcard" label="教师身份证号" width="200"> </el-table-column>
    <el-table-column prop="t_number" label="教师员工号" width="200"> </el-table-column>
    <el-table-column prop="college_name" label="所属学院"> </el-table-column>
  </el-table>
  </el-main>
</template>

<script>
import { defineComponent } from "vue";
const axios = require("axios");

export default defineComponent({
  name: "Jsbbxx",
  components: {},
  data() {
    return {
      input: "",
      labelPosition: "top",
      tableData: [],
      dialogFormVisible: false, //增加的表单
      dialogFormVisible1: false, //修改的表单
      form: {
        t_number:"",
        teacher_name: "",
        teacher_sex: "",
        t_phone: "",
        t_idcard: "",
        college_name:"",
      },
    };
  },
  mounted() {
    this.form.t_number=this.$store.state.t_number;
    this.individual();
  },
  methods: {
    //教师个人信息
    individual() {
      let _this = this;
      axios
        .post("https://localhost:44386/api/Teachers/getteacher ", {
          t_number: _this.form.t_number,
        })
        .then(function (response) {
          // handle success
          _this.tableData = response.data;
        });
    },
  },
});
</script>

<style >
.souan {
  float: right;
}
.sou {
  width: 200px;
  float: right;
}
header {
  /*header容器，一个template必须只能有一个容器*/
  display: flex; /*弹性布局*/
  height: 100%;
  align-items: center;
  justify-content: space-between; /*不用float浮动布局，采用两边布局*/
}
.l-content {
  /*左边的菜单拉伸按钮*/
  display: flex;
  align-items: center;
}
.l-content .el-button {
  /*面包屑跟 菜单按钮的间距*/
  margin-right: 20px;
}

.r-content .user {
  /*设置图片的大小，以及圆滑度*/
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.el-breadcrumb__inner a,
.el-breadcrumb__inner.is-link {
  color: #fff;
}
.tac {
  text-align: center;
}
.el-menu-vertical-demo {
  width: 200px;
}
.el-container {
  height: 960px;
}
body {
  margin: 0;
  padding: 0;
}
.el-header,
.el-footer {
  background-color: #333333;
  color: var(--el-text-color-primary);
  text-align: center;
  line-height: 60px;
}

.el-aside {
  color: var(--el-text-color-primary);
  text-align: center;
}

.el-main {
  background-color: #e9eef3;
  color: var(--el-text-color-primary);
  text-align: center;
  line-height: 160px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
</style>